package com.niit.onlinemusicserver34.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.niit.onlinemusicserver34.model.domain.RankList;
import org.apache.ibatis.annotations.Param;

public interface RankListMapper extends BaseMapper<RankList> {

    /**
     * 查平均分
     * @param songListId
     * @return
     */
    int selectAverageScore(Long songListId);

    /**
     * 查指定用户评分
     * @param consumerId
     * @param songListId
     * @return
     */
    int selectUserRank(@Param("consumer_id") Long consumerId, @Param("song_list_id")  Long songListId);
}
